import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/warehouse_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/warehouse_entity.g.dart';

/// 仓库实体
@JsonSerializable()
class WarehouseEntity implements ChoiceBean{
  WarehouseEntity();

  factory WarehouseEntity.fromJson(Map<String, dynamic> json) => $WarehouseEntityFromJson(json);

  ///	企业code
  String? companyCode = '';

  ///	创建人
  String? createBy = '';

  ///	创建时间
  String? createDate = '';

  ///	当前存储量
  int? currentStorageCapacity = 0;

  ///	正常0，已删除1
  String? deleted = '';

  /// 主键id
  String? id = '';

  ///	即将超量提醒
  int? immediately = 0;

  /// 定（限）员数量
  int? limitedPersonnelNum = 0;

  ///	安全员电话
  String? mobile = '';

  ///	实时人数
  int? relTimeNum = 0;

  ///	静电释放次数 目前没用上
  int? releaseNum = 0;

  ///	责任人电话
  String? responsibilityPhone = '';

  ///	安全责任人id
  String? sadetyPersonId = '';

  ///	安全责任人名称
  String? sadetyPersonName = '';

  ///	修改人
  String? updateBy = '';

  ///	修改时间
  String? updateDate = '';

  ///	仓库面积
  String? warehouseArea = '';

  ///	仓库等级
  String? warehouseLevel = '';

  ///	仓库名称
  String? warehouseName = '';

  ///	仓库编号
  String? warehouseNumber = '';

  ///	存储量
  int? warehouseStore = 0;

  /// 是否超量 true 超量 false 未超量
  bool excess = false;

  /// 是否选中
  bool isChecked = false;

  Map<String, dynamic> toJson() => $WarehouseEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id!;
  }

  @override
  bool getIsChecked() {
    return isChecked;
  }

  @override
  String getShowName() {
    return warehouseName!;
  }

  @override
  setIsChecked(bool isChecked) {
    this.isChecked = isChecked;
  }
}
